/**
 * Description:
 * Class Name:InheritableTest
 * Date:2022/4/23 16:30
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第14章_Annotation注解._14_2_JDK元注解._14_2_4_使用艾特Inherited;

@Inheritable
class Base{}

/*
InheritableTest类只是继承了Base类，
并没有直接使用@Inheritable注解修饰
 */
public class InheritableTest extends Base{
    public static void main(String[] args) {
        // 打印InheritableTest类是否有@Inheritable注解修饰
        System.out.println(InheritableTest.class.isAnnotationPresent(Inheritable.class));
    }
}
